package com.ylbh.modules.returngoods.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ylbh.common.pojo.goodsorder.dto.OrderShipmentDTO;
import com.ylbh.common.pojo.goodsorder.vo.ExpressCompanyVO;
import com.ylbh.common.pojo.home.vo.HomeStateStatisticsVO;
import com.ylbh.common.pojo.returngoods.UserMailDTO;
import com.ylbh.common.pojo.returngoods.dto.ExecutionPaymentDTO;
import com.ylbh.common.pojo.returngoods.dto.OrderReturnToExamineDTO;
import com.ylbh.common.pojo.returngoods.dto.ShoppingMallOrderReturnListDTO;
import com.ylbh.common.pojo.returngoods.dto.UpdateOrderReturnDetailsDTO;
import com.ylbh.common.pojo.returngoods.vo.ExpressCompanyVo;
import com.ylbh.common.pojo.returngoods.vo.RefundAmountVO;
import com.ylbh.common.pojo.returngoods.vo.ShoppingMallOrderReturnDetailsVO;
import com.ylbh.common.utils.PageUtils;
import com.ylbh.modules.returngoods.entity.ShoppingOrderReturn;

import java.math.BigDecimal;
import java.util.List;
import java.util.concurrent.ExecutionException;


/**
 *
 * 退货
 * @author czx
 * @date 2019-06-09 14:22:40
 */
public interface ShoppingOrderReturnService extends IService<ShoppingOrderReturn> {

    /**
     * 商城订单退货列表
     * @param orderReturnListDTO
     * @return
     */
    PageUtils queryShoppingMallOrderReturnList(ShoppingMallOrderReturnListDTO orderReturnListDTO) throws ExecutionException, InterruptedException;

    /**
     * 对退货/退款/换货订单进行审核操作
     * @param returnId
     * @param type
     * @param remark
     */
    void modifyReturnStatusById(String returnId, String type,String goodsCartId, String remark);

    /**
     * 商城订单退货列表详情
     * @param returnId
     * @return
     */
    ShoppingMallOrderReturnDetailsVO getShoppingMallOrderReturnDetails(String returnId);

    /**
     * 换货订单进行审核操作
     * @param orderReturnToExamineDTO
     * @return
     */
    String modifyReturnToExamine(OrderReturnToExamineDTO orderReturnToExamineDTO);

    /**
     * 所有物流公司信息
     * @return
     */
    List<ExpressCompanyVo> queryExpress();

    /**
     * 对退货/换货订单进行发货操作
     * @param orderReturnToExamineDTO
     * @return
     */
    String shipmentByExchange(OrderReturnToExamineDTO orderReturnToExamineDTO);

    /**
     * 确认供应商是否已经打款给公司
     * @param returnId
     * @param type
     */
    void modifyMakeMoneyType(String returnId, String type);

    /**
     * 立即执行退款
     * @param executionPaymentDTO
     * @return
     */
    String executionPayment(ExecutionPaymentDTO executionPaymentDTO);

    /**
     * 查询退款用户的退款总金额
     * @param returnId
     * @return
     */
    RefundAmountVO getRefundAmount(String returnId);

    /**
     * 根据当前类型来修改物流号
     * @param type
     * @param orderShipmentDTO
     */
    void modifyLogisticsInformation(Integer type, OrderShipmentDTO orderShipmentDTO);

    /**
     * 供应商确认收货
     * @param returnId
     */
    String modifyVendorConfirmation(String returnId);

    /**
     * 换货订单-供应商发货
     * @param orderShipmentDTO
     */
    void modifySupplierDelivery(OrderShipmentDTO orderShipmentDTO);

    /**
     * 退换货核销
     * @param returnId
     * @return
     */
    String writeOffByReturnId(String returnId);

    /**
     * 供应商确认收货
     * @param orderReturnToExamineDTO
     * @return
     */
    String vendorConfirmation(OrderReturnToExamineDTO orderReturnToExamineDTO);

    /**
     * 修改退换货详情信息
     * @param dto
     */
    void modifyReturnGoodsById(UpdateOrderReturnDetailsDTO dto);

    /**
     * 退换货未审核订单开始
     * @return
     */
    List<HomeStateStatisticsVO> queryOrderReturn();

    /**
     * 替用户进行寄件操作
     * @param userMailDTO
     * @return
     */
    void modifyUserMailById(UserMailDTO userMailDTO);
}

